#ifndef FILELOGGER_H_
#define FILELOGGER_H_

#include <e32std.h>
#include <flogger.h>  // link against flogger.lib

_LIT( KLogsDir, "madhacker"); // directory under c:\logs - these macros work only if this directory exists

_LIT( KLogFileName, "startbackup.log");

#define __LOGSTR_TOFILE(S)     {_LIT(KTmpStr, S);RFileLogger::WriteFormat(KLogsDir(), KLogFileName(), EFileLoggingModeAppend, KTmpStr());}
#define __LOGSTR_TOFILE1(S, P) {_LIT(KTmpStr, S);RFileLogger::WriteFormat(KLogsDir(), KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(KTmpStr()), P);}
#define __LOGSTR_TOFILE2(S, P0, P1) {_LIT(KTmpStr, S);RFileLogger::WriteFormat(KLogsDir(), KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(KTmpStr()), P0, P1);}
#define __LOGSTR_TOFILE3(S, P0, P1, P2) {_LIT(KTmpStr, S);RFileLogger::WriteFormat(KLogsDir(), KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(KTmpStr()), P0, P1, P2);}

#endif /*FILELOGGER_H_*/
